import { Routes, Route, Navigate } from "react-router-dom";
// import Layout from "../components/Layout";
import Home from "../pages/Home/Home";
import Login from "../pages/Login/Login";

const AppRoutes = () => {
  return (
    <>
      <Routes>
        {/* 将根路径重定向到登录页面 */}
        <Route path="/" element={<Navigate to="/login" replace />} />
        <Route path="/home" element={<Home />} />
        <Route path="/login" element={<Login />} />
        {/* 404 页面 */}
        <Route path="*" element={<div>404 页面不存在</div>} />
      </Routes>
    </>
  );
};

export default AppRoutes;